<article id="wikiArticle">
<div>
</div>
<h2 id="Summary" name="Summary">概述</h2>
<p><strong><code>Number.prototype</code></strong> 属性表示 <a href="Reference/Global_Objects/Number" title="JavaScript 的 Number 对象是经过封装的能让你处理数字值的对象。Number 对象由 Number() 构造器创建。"><code>Number</code></a> 构造函数的原型。</p>
<div>
<table class="standard-table">
<thead>
<tr>
<th class="header" colspan="2"><code>Number.prototype</code> 属性的属性特性：</th>
</tr>
</thead>
<tbody>
<tr>
<td>writable</td>
<td>false</td>
</tr>
<tr>
<td>enumerable</td>
<td>false</td>
</tr>
<tr>
<td>configurable</td>
<td>false</td>
</tr>
</tbody>
</table></div>
<h2 id="Description" name="Description">描述</h2>
<p>所有 <code>Number</code> 实例都继承自 <code>Number.prototype</code>。修改 <a href="Reference/Global_Objects/Number" title="JavaScript 的 Number 对象是经过封装的能让你处理数字值的对象。Number 对象由 Number() 构造器创建。"><code>Number</code></a> 构造函数的原型对象会影响到所有 <code>Number</code> 实例。.</p>
<h2 id="属性">属性</h2>
<dl>
<dt>
  constructor</dt>
<dd>
  返回创建该实例对象的构造函数。默认为 <a href="Reference/Global_Objects/Number" title="JavaScript 的 Number 对象是经过封装的能让你处理数字值的对象。Number 对象由 Number() 构造器创建。"><code>Number</code></a> 对象。</dd>
</dl>
<div>
<div class="blockIndicator inheritsbox template-jsOverrides">
<div><span style="font-weight: 700;">Properties inherited from <a href="https://developer.mozilla.orgReference/Global_Objects/Object"><code>Object</code></a>:</span></div>
<div><a class="internal" href="https://developer.mozilla.orgReference/Global_Objects/Object/Parent"><code>__parent__</code></a>, <a class="internal" href="https://developer.mozilla.orgReference/Global_Objects/Object/Proto"><code>__proto__</code></a></div>
</div></div>
<h2 id="方法">方法</h2>
<dl>
<dt>
<a href="Reference/Global_Objects/Number/toExponential" title="toExponential() 方法以指数表示法返回该数值字符串表示形式。"><code>Number.prototype.toExponential()</code></a></dt>
<dd>
  返回一个使用指数表示法表示的该数值的字符串表示。</dd>
<dt>
<a href="Reference/Global_Objects/Number/toFixed" title="toFixed() 方法使用定点表示法来格式化一个数。"><code>Number.prototype.toFixed()</code></a></dt>
<dd>
  返回一个使用定点表示法表示的该数值的字符串表示。</dd>
<dt>
<a href="Reference/Global_Objects/Number/toLocaleString" title="toLocaleString() 方法返回这个数字在特定语言环境下的表示字符串。"><code>Number.prototype.toLocaleString()</code></a></dt>
<dd>
  返回一个与语言相关的该数值对象的字符串表示。覆盖了<a href="Reference/Global_Objects/Object/toLocaleString" title="toLocaleString() 方法返回一个该对象的字符串表示。此方法被用于派生对象为了特定语言环境的目的（locale-specific purposes）而重载使用。"><code>Object.prototype.toLocaleString()</code></a> 方法。</dd>
<dt>
<a href="Reference/Global_Objects/Number/toPrecision" title="toPrecision() 方法以指定的精度返回该数值对象的字符串表示。"><code>Number.prototype.toPrecision()</code></a></dt>
<dd>
  使用定点表示法或指数表示法来表示的指定显示位数的该数值对象的字符串表示。</dd>
<dt>
<a href="Reference/Global_Objects/Number/toSource" title="toSource() 方法返回该对象源码的字符串表示。"><code>Number.prototype.toSource()</code></a> <span class="icon-only-inline" title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></dt>
<dd>
  Returns an object literal representing the specified Number object; you can use this value to create a new object. Overrides the <a href="Reference/Global_Objects/Object/toSource" title="toSource()方法返回一个表示对象源代码的字符串。"><code>Object.prototype.toSource()</code></a> method.</dd>
<dt>
<a href="Reference/Global_Objects/Number/toString" title="toString() 方法返回指定 Number 对象的字符串表示形式。"><code>Number.prototype.toString()</code></a></dt>
<dd>
  返回一个表示该数值对象的字符串。覆盖了 <a href="Reference/Global_Objects/Object/toString" title="toString() 方法返回一个表示该对象的字符串。"><code>Object.prototype.toString()</code></a> 方法。</dd>
<dt>
<a href="Reference/Global_Objects/Number/valueOf" title="valueOf() 方法返回一个被 Number 对象包装的原始值。"><code>Number.prototype.valueOf()</code></a></dt>
<dd>
  返回该数值对象的原始值。覆盖了 <a href="Reference/Global_Objects/Object/valueOf" title="valueOf() 方法返回指定对象的原始值。"><code>Object.prototype.valueOf()</code></a> 方法。</dd>
</dl>
<div>
<div class="blockIndicator inheritsbox template-jsOverrides">
<div><span style="font-weight: 700;">Methods inherited from <a href="https://developer.mozilla.orgReference/Global_Objects/Object"><code>Object</code></a>:</span></div>
<div><a class="internal new" href="https://developer.mozilla.orgReference/Global_Objects/Object/DefineGetter" rel="nofollow"><code>__defineGetter__</code></a>, <a class="internal new" href="https://developer.mozilla.orgReference/Global_Objects/Object/DefineSetter" rel="nofollow"><code>__defineSetter__</code></a>, <a class="internal" href="https://developer.mozilla.orgReference/Global_Objects/Object/HasOwnProperty"><code>hasOwnProperty</code></a>, <a class="internal" href="https://developer.mozilla.orgReference/Global_Objects/Object/IsPrototypeOf"><code>isPrototypeOf</code></a>, <a class="internal" href="https://developer.mozilla.orgReference/Global_Objects/Object/LookupGetter"><code>__lookupGetter__</code></a>, <a class="internal new" href="https://developer.mozilla.orgReference/Global_Objects/Object/LookupSetter" rel="nofollow"><code>__lookupSetter__</code></a>, <a class="internal" href="https://developer.mozilla.orgReference/Global_Objects/Object/NoSuchMethod"><code>__noSuchMethod__</code></a>, <a class="internal" href="https://developer.mozilla.orgReference/Global_Objects/Object/PropertyIsEnumerable"><code>propertyIsEnumerable</code></a>, <a class="internal" href="https://developer.mozilla.orgReference/Global_Objects/Object/Unwatch"><code>unwatch</code></a>, <a class="internal" href="https://developer.mozilla.orgReference/Global_Objects/Object/Watch"><code>watch</code></a></div>
</div></div>
<div>
  </div>
<h2 id="规范">规范</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">规范版本</th>
<th scope="col">规范状态</th>
<th scope="col">注解</th>
</tr>
<tr>
<td>ECMAScript 1st Edition. Implemented in JavaScript 1.1</td>
<td>Standard</td>
<td>Initial definition.</td>
</tr>
<tr>
<td><a class="external" href="https://www.ecma-international.org/ecma-262/5.1/#sec-15.7.4" hreflang="en" lang="en" rel="noopener">ECMAScript 5.1 (ECMA-262)<br/><small lang="zh-CN">Number</small></a></td>
<td><span class="spec-Standard">Standard</span></td>
<td> </td>
</tr>
<tr>
<td><a class="external" href="https://www.ecma-international.org/ecma-262/6.0/#sec-properties-of-the-number-prototype-object" hreflang="en" lang="en" rel="noopener">ECMAScript 2015 (6th Edition, ECMA-262)<br/><small lang="zh-CN">Number</small></a></td>
<td><span class="spec-Standard">Standard</span></td>
<td> </td>
</tr>
</tbody>
</table>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
<p></p><div class="blockIndicator warning"><strong><a class="external" href="https://github.com/mdn/browser-compat-data" rel="noopener">We're converting our compatibility data into a machine-readable JSON format</a></strong>.
            This compatibility table still uses the old format,
            because we haven't yet converted the data it contains.
            <strong><a class="new" href="/zh-CN/docs/MDN/Contribute/Structures/Compatibility_tables" rel="nofollow">Find out how you can help!</a></strong></div>
<div class="htab">
<a id="AutoCompatibilityTable" name="AutoCompatibilityTable"></a>
<ul>
<li class="selected"><a>Desktop</a></li>
<li><a>Mobile</a></li>
</ul>
</div><p></p>
<div id="compat-desktop">
<table class="compat-table">
<tbody>
<tr>
<th>Feature</th>
<th>Chrome</th>
<th>Firefox (Gecko)</th>
<th>Internet Explorer</th>
<th>Opera</th>
<th>Safari</th>
</tr>
<tr>
<td>Basic support</td>
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
</tr>
</tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table">
<tbody>
<tr>
<th>Feature</th>
<th>Android</th>
<th>Chrome for Android</th>
<th>Firefox Mobile (Gecko)</th>
<th>IE Mobile</th>
<th>Opera Mobile</th>
<th>Safari Mobile</th>
</tr>
<tr>
<td>Basic support</td>
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
<td><span style="color: #888;" title="Please update this with the earliest version of support.">(Yes)</span></td>
</tr>
</tbody>
</table>
</div>
<p> </p>
</article>